package com.yc.boottxx.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class IndexAction {

    @GetMapping("hello")
    String hello() {
        return "hello txx";
    }

    @GetMapping("/")
    ModelAndView hello( ModelAndView modelAndView) {
        modelAndView.setViewName("redirect:/task.html");
        return modelAndView;
    }
}
